package com.ccit.springbootlaw.pojo;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.List;

// 分页数据封装类
// 用于封装分页查询结果
// page 当前页码
// rowsPerPage 每页数据行数
// total 总记录数
// rows 当前页数据列表
@NoArgsConstructor
@AllArgsConstructor
public class PageBean<T> {
    private long total;
    private List<T> rows;
    private int page;
    private int rowsPerPage;

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRowsPerPage() {
        return rowsPerPage;
    }

    public void setRowsPerPage(int rowsPerPage) {
        this.rowsPerPage = rowsPerPage;
    }
}
